package com.example;

import com.example.config.AppConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);

        System.out.println("Spring IOC容器已启动，线程池任务执行中...");

        // 保持主线程运行一段时间
        try {
            Thread.sleep(10000); // 运行10秒
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}